<?php
class MY_Input extends CI_Input{
	
	public function __construct(){
		parent::__construct();
	}

	// --------------------------------------------------------------------

	/**
	* Fetch an item from the REQUEST array
	*
	* @access	public
	* @param	string
	* @param	bool
	* @return	string
	*/
	function request($index = NULL, $xss_clean = FALSE)
	{
		// Check if a field has been provided
		if ($index === NULL)
		{
			$request = array();

			if(!empty($_REQUEST)){
				// loop through the full _REQUEST array
				foreach (array_keys($_REQUEST) as $key)
				{
					$request[$key] = $this->_fetch_from_array($_REQUEST, $key, $xss_clean);
				}
			}
			return $request;
		}

		return $this->_fetch_from_array($_REQUEST, $index, $xss_clean);
	}
}